package com.qqtech.qquan.homemaking.model;

import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;
import com.qqtech.qquan.homemaking.enums.HomemakingBaseConst;

@SuppressWarnings("serial")
public class HomemakingTypeVo extends HomemakingType{
	
	/**
	 * 父级的名称
	 */
	private String parentName;
	
	/**
	 * 子级
	 */
	private List<HomemakingTypeVo> childrenList;
	
	/**
	 * 加上后缀的小图
	 */
	private String smallImg;
	
	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public List<HomemakingTypeVo> getChildrenList() {
		return childrenList;
	}

	public void setChildrenList(List<HomemakingTypeVo> childrenList) {
		this.childrenList = childrenList;
	}

	public String getSmallImg() {
		if (StringUtil.isNotBlank(getImg())) {
			smallImg = getImgHandleDomain() + getImg() + HomemakingBaseConst.SMALL_IMG_SUFFIX;
		}
		return smallImg;
	}

	public void setSmallImg(String smallImg) {
		this.smallImg = smallImg;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}
}